﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.Media;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
using System.IO;

namespace HotelBookingSystem.DataBaseStuff
{
    class _Broker
    {
        public _City[] cities;
        public _Broker()
        {
            int numberCities = dataCities.cityClasses.Length;
            cities = new _City[numberCities];

            for (int i = 0; i < numberCities; i++)
            {
                string cityNameA = dataCities.cityClasses[i].GetType().ToString();
                cities[i] = new _City();
                cities[i].name = cityNameA;

                int numberHotels = dataCities.cityClasses[i].hotelNames.Length;
                cities[i].hotels = new _Hotel[numberHotels];

                for (int j = 0; j < dataCities.cityClasses[i].hotelNames.Length; j++)
                {
                    cities[i].hotels[j] = new _Hotel();
                    cities[i].hotels[j].hotelName =
                        dataCities.cityClasses[i].hotelNames[j];
                    for (int k = 0; k < cities[i].hotels[j].oneBed.Length; k++)
                        cities[i].hotels[j].oneBed[k] = new _Room();
                    for (int k = 0; k < cities[i].hotels[j].twoBed.Length; k++)
                        cities[i].hotels[j].twoBed[k] = new _Room();
                    for (int k = 0; k < cities[i].hotels[j].app.Length; k++)
                        cities[i].hotels[j].app[k] = new _Room();
                }
            }
        }
    }

}